/**
 * 
 */
package verifiers;

import java.awt.Color;

import javax.swing.InputVerifier;
import javax.swing.JComponent;
import javax.swing.JTextField;

public class LoginVerifier extends InputVerifier {

	@Override
	public boolean verify(JComponent input) {
		String value = ((JTextField) input).getText();

		if (value == null || value.trim().equals("")) {
			input.setBackground(Color.red);
			return false;
		} else {
			input.setBackground(Color.white);
			return true;

		}

	}

}
